package cn.wolfcode.rbac.service.system_manage;

import cn.wolfcode.rbac.domain.Permission;
import cn.wolfcode.rbac.query.QueryObject;
import cn.wolfcode.rbac.util.PageResult;

import java.util.List;

/**
 * @version 1.0
 * @Author:Cao Zhijian
 * @DATE:2020/12/24 0024 14:39:41
 */
public interface IPermissionService {

    /**
     * 根据id删除权限
     * @param id
     */
    void delete(Long id);

    /**
     * 新增或更新权限
     * permission有id是为更新
     * permission没有id是新增
     * @param permission
     */
    void saveOrUpdate(Permission permission);

    /**
     * 查找权限
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/24 0024 14:44
     * @param id :
     * @return : cn.wolfcode.rbac.domain.Permission
     */
    Permission get(Long id);

    /**
     * 查找所有权限
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/24 0024 14:45
     * @return : java.util.List<cn.wolfcode.rbac.domain.Permission>
     */
    List<Permission> listAll();

    /**
     * 分页相关的方法
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/24 0024 21:45
     * @param queryObject :
     * @return : java.util.List<cn.wolfcode.rbac.domain.Permission>
     */
    PageResult query(QueryObject queryObject);

    /**
     * 加载权限
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/25 0025 11:04
     * @return : void
     */
    void reload();
}
